package com.example.azheng.rxjavamvpdemo.mvp.model;


import com.example.azheng.rxjavamvpdemo.bean.BaseArrayBean;
import com.example.azheng.rxjavamvpdemo.bean.banner.Banner;
import com.example.azheng.rxjavamvpdemo.bean.notice.Notice;
import com.example.azheng.rxjavamvpdemo.mvp.contract.HomeContract;
import com.example.azheng.rxjavamvpdemo.net.RetrofitClient;

import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * GitHub：https://github.com/RookieExaminer
 * Email：wei.azheng@foxmail.com
 * Description：
 */
public class HomeModel implements HomeContract.Model {

    @Override
    public Flowable<BaseArrayBean<Notice>> notice() {
        return RetrofitClient.getInstance().getApi().notice();
    }

    @Override
    public Flowable<BaseArrayBean<Banner>> banner() {
        return RetrofitClient.getInstance().getApi().banner();
    }
}
